/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.maternity.classes.dao;

import br.com.maternity.classes.entity.Procedimento;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Gattini
 */

public class ProcedimentoDAO extends GenericDAO<Procedimento> {
    private static Procedimento instance = new Procedimento();

    public ProcedimentoDAO() {
        super(instance);
    }

    @Override
    public List<GenericDAOField> listFields() {
        List l = new ArrayList<GenericDAOField>();

        l.add(new GenericDAOField(
                "Codigo", "setCodigo", "getCodigo", String.class, true, GenericDAOFieldPrimaryKey.NOTHING));
        l.add(new GenericDAOField(
                "Descricao", "setDescricao", "getDescricao", String.class));

        return l;
    }

    @Override
    public String tableName() {
        return "Procedimento";
    }
    
    public List<Procedimento> selectAll(){
        return super.selectList("SELECT * FROM " + tableName());
    }
    
}
